package com.appsindy.reserv.dao.mapper;

import java.sql.Connection;
import java.util.Properties;

import javax.sql.DataSource;

import org.apache.ibatis.transaction.Transaction;
import org.apache.ibatis.transaction.TransactionFactory;

/**
 * Factory for Spring transactions.
 * 
 */
public class SpringTransactionFactory implements TransactionFactory {

	/**
	 * Connection's data source.
	 */
	private final DataSource dataSource;

	SpringTransactionFactory(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public Transaction newTransaction(Connection conn, boolean autoCommit) {
		return new SpringTransaction(dataSource, conn);
	}

	public void setProperties(Properties props) {
	}
}
